<select id="{$select_id_val}" name="{$select_id_val}" style="{$select_style}">
<php>	
$optionhtml = '';
if($listpartners){
		foreach($listpartners as $data){
				if($selected_partner_id==$data['id']){
						$optionhtml = $optionhtml.'<option value="'.$data['id'].'" selected>'.$data['title'].'</option>';
				}else{
						$optionhtml = $optionhtml.'<option value="'.$data['id'].'">'.$data['title'].'</option>';
				}
		}
		if(!empty($optionhtml)){
				$optionhtml = '<option value="">无上级商户</option>'.$optionhtml;
		}
}
if(empty($optionhtml)){
		$optionhtml = '<option value="" selected>无上级商户</option>';
}
echo $optionhtml;
</php>
</select>